package com.jibei.mendo.bean;

import android.os.Parcel;
import android.os.Parcelable;

import org.greenrobot.greendao.annotation.Entity;
import org.greenrobot.greendao.annotation.Id;
import org.greenrobot.greendao.annotation.Generated;

/**
 * Created by lhl on 2019/9/1.
 * 点火信息表
 */
@Entity
public class IgnitionInfoBean implements Parcelable {

    @Id(autoincrement = true)
    private Long id;
    private String time;//发送点火的时间点
    private String command;//点火命令

    @Generated(hash = 878774360)
    public IgnitionInfoBean(Long id, String time, String command) {
        this.id = id;
        this.time = time;
        this.command = command;
    }

    @Generated(hash = 607929829)
    public IgnitionInfoBean() {
    }

    public Long getId() {
        return this.id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getTime() {
        return this.time;
    }

    public void setTime(String time) {
        this.time = time;
    }

    public String getCommand() {
        return this.command;
    }

    public void setCommand(String command) {
        this.command = command;
    }


    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeValue(this.id);
        dest.writeString(this.time);
        dest.writeString(this.command);
    }

    protected IgnitionInfoBean(Parcel in) {
        this.id = (Long) in.readValue(Long.class.getClassLoader());
        this.time = in.readString();
        this.command = in.readString();
    }

    public static final Creator<IgnitionInfoBean> CREATOR = new Creator<IgnitionInfoBean>() {
        @Override
        public IgnitionInfoBean createFromParcel(Parcel source) {
            return new IgnitionInfoBean(source);
        }

        @Override
        public IgnitionInfoBean[] newArray(int size) {
            return new IgnitionInfoBean[size];
        }
    };

    @Override
    public String toString() {
        return "IgnitionInfoBean{" +
                "id=" + id +
                ", time='" + time + '\'' +
                ", command='" + command + '\'' +
                '}';
    }
}
